function page_ctrl(data_obj) {
    var obj_box=(data_obj.obj_box!== undefined)?data_obj.obj_box:function () {
      return;
    };//缈婚〉瀹瑰櫒dom瀵硅薄,蹇呰鍙傛暟
    var total_item=(data_obj.total_item!== undefined)?parseInt(data_obj.total_item):0;//鏁版嵁鏉＄洰鎬绘暟,榛樿涓�0,缁勪欢灏嗕笉鍔犺浇
    var per_num=(data_obj.per_num!== undefined)?parseInt(data_obj.per_num):5;//姣忛〉鏄剧ず鏉℃暟,榛樿涓�10鏉�
    var current_page=(data_obj.current_page!== undefined)?parseInt(data_obj.current_page):1;//褰撳墠椤�,榛樿涓�1
    var total_page=Math.ceil(total_item/per_num);//璁＄畻鎬婚〉鏁� ,涓嶈冻2椤�,涓嶅姞杞界粍浠�
    if(total_page<2){
      return;
    }
    //鍦ㄦ寚瀹氬鍣ㄥ唴鍔犺浇鍒嗛〉鏁版嵁
    $(obj_box).append('<div class="page_content"></div>');
    //鍦ㄦ寚瀹氬鍣ㄥ唴鍔犺浇鍒嗛〉鎻掍欢
    $(obj_box).append('<div class="page_ctrl"></div>');
    function page_even() {
      //褰撳墠椤甸檺瀹�,闈炴暟瀛楁垨灏忎簬1璺宠浆鍒扮涓€椤�,澶т簬鎬婚〉鏁�,璺宠浆鍒版渶鍚庝竴椤�
      var regPos = /^\d+$/; // 闈炶礋鏁存暟
      if(regPos.test(current_page)){
        current_page=current_page<1?1:(current_page>total_page?total_page:current_page);
      }else{
        current_page=1;
      }
      data_obj.change_content(per_num,current_page);
      var inp_val=(current_page==total_page)?1:current_page;//璺宠浆椤垫暟,input榛樿鏄剧ず鍊�
      var append_html='<button class="prev_page">涓婁竴椤�</button>';
      for(var i=0;i<total_page-1;i++){
        if(total_page>8&&current_page>6&&i<current_page-3){
          if(i<2){
            append_html+='<button class="page_num">'+(i+1)+'</button>';
          }
          else if(i==2){
            append_html+='<span class="page_dot">鈥⑩€⑩€�</span>';
          }
        }
        else if(total_page>8&&current_page<total_page-3&&i>current_page+1){
          if(current_page>6&&i==current_page+2){
            append_html+='<span class="page_dot">鈥⑩€⑩€�</span>';
          }else if(current_page<7){
            if(i<8){
              append_html+='<button class="page_num">'+(i+1)+'</button>';
            }else if(i==8){
              append_html+='<span class="page_dot">鈥⑩€⑩€�</span>';
            }
          }
        }
        else{
          if(i==current_page-1){
            append_html+='<button class="page_num current_page">'+(i+1)+'</button>';
          }
          else{
            append_html+='<button class="page_num">'+(i+1)+'</button>';
          }
        }
      }
      if(current_page==total_page){
        append_html+='<button class="page_num current_page">'+(i+1)+'</button>';
      }else{
        append_html+='<button class="page_num">'+(i+1)+'</button>';
      }
      append_html+='<button class="next_page">涓嬩竴椤�</button><span class="page_total">鍏� '+total_page+' 椤�, 鍒扮</span><input class="input_page_num" type="text" value="'+inp_val+'"><span class="page_text">椤�</span><button class="to_page_num">纭畾</button>';
      $(obj_box).children('.page_ctrl').append(append_html);
      if(current_page==1){
        $(obj_box+' .page_ctrl .prev_page').attr('disabled','disabled').addClass('btn_dis');
      }else{
        $(obj_box+' .page_ctrl .prev_page').removeAttr('disabled').removeClass('btn_dis');
      }
      if(current_page==total_page){
        $(obj_box+' .page_ctrl .next_page').attr('disabled','disabled').addClass('btn_dis');
      }else{
        $(obj_box+' .page_ctrl .next_page').removeAttr('disabled').removeClass('btn_dis');
      }
    };
    page_even();
    $(obj_box+' .page_ctrl').on('click','button',function () {
      var that=$(this);
      if(that.hasClass('prev_page')){
        if(current_page!=1){
          current_page--;
          that.parent('.page_ctrl').html('');
          page_even();
        }
      }
      else if(that.hasClass('next_page')){
        if(current_page!=total_page){
          current_page++;
          that.parent('.page_ctrl').html('');
          page_even();
        }
      }
      else if(that.hasClass('page_num')&&!that.hasClass('current_page')){
        current_page=parseInt(that.html());
        that.parent('.page_ctrl').html('');
        page_even();
      }
      else if(that.hasClass('to_page_num')){
        current_page=parseInt(that.siblings('.input_page_num').val());
        that.parent('.page_ctrl').html('');
        page_even();
      }
    });
  }